package tests.states;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import auction.AuctionState;
import auction.states.Cancelled;

public class CancelledTest {

	AuctionState cancelled;
	
	@Before
	public void setUp() throws Exception {
		cancelled = new Cancelled();
	}

	@After
	public void tearDown() throws Exception {
		cancelled = null;
	}

	@Test
	public void testCancelAuction() {
		/* besoin d'un stub
		String attendu = "ERROR: auction already cancelled";
		String result = cancelled.cancelAuction(null, null);
		assertEquals(attendu,result);
		*/
		fail("Not yet implemented");
	}

	@Test
	public void testClose() {
		/* besoin d'un stub
		boolean erreur = false;
		try{
			cancelled.close(null);
		}catch(Error e){
			erreur = true;
			String attendu = "Cannot close a cancelled auction.";
			String result = e.getMessage();
			assertEquals(attendu,result);
		}
		assertTrue(erreur);
		*/
		fail("Not yet implemented");
	}

	@Test
	public void testGetCurrentBid() {
		// Stub needed
		fail("Not yet implemented");
	}

	@Test
	public void testGetName() {
		String attendu = "CANCELLED";
		String result = cancelled.getName();
		assertEquals(attendu,result);
	}

	@Test
	public void testJoin() {
		fail("Not yet implemented");
	}

	@Test
	public void testLeave() {
		fail("Not yet implemented");
	}

	@Test
	public void testOpen() {
		fail("Not yet implemented");
	}

	@Test
	public void testPlaceBid() {
		fail("Not yet implemented");
	}

	@Test
	public void testPostMessage() {
		fail("Not yet implemented");
	}

	@Test
	public void testSetDesc() {
		fail("Not yet implemented");
	}

	@Test
	public void testSetEndDate() {
		fail("Not yet implemented");
	}

	@Test
	public void testSetMinBid() {
		fail("Not yet implemented");
	}

	@Test
	public void testSetResPrice() {
		fail("Not yet implemented");
	}

	@Test
	public void testSetStartDate() {
		fail("Not yet implemented");
	}

}
